package scrumtaculous.service;

import java.util.List;

import scrumtaculous.domain.Note;
import scrumtaculous.domain.Story;
import scrumtaculous.domain.StoryDao;

public class StoryManagerImpl implements StoryManager
{

   private StoryDao storyDao = null;

   public void setStoryDao(StoryDao storyDaoIn)
   {
      this.storyDao = storyDaoIn;
   }

   @SuppressWarnings("unchecked")
   public List<Story> find()
   {
      return storyDao.find();
   }

   @SuppressWarnings("unchecked")
   public List<Story> find(Story story)
   {
      return storyDao.find(story);
   }

   public Story find(Integer id)
   {
      return (Story) storyDao.findById(id);
   }

   public Story save(Story story)
   {
      return storyDao.save(story);
   }

   @Override
   public List<Note> findNotes(Integer id)
   {
      return storyDao.findNotes(id);
   }
}
